Copyright: Delphi v.3.0 Copyright (c) 1982-1997 Borland International, Inc.


Delphi Database Explorer: Overview
Database Explorer: Overview

The Database Explorer is a hierarchical database browser with editing capabilities as described below. Each version of Delphi ships with a different Database Explorer:

Delphi version	Explorer name	Notes
Client/Server Suite	SQL Explorer	SQL enabled: accesses SQL databases on remote servers Data dictionary enabled.
Developer	Database Explorer	Access local databases, and the Local InterBase Server (LIBS).With third party ODBC drivers, permits access to ODBC-compliant databases, but does not support extended SQL browsing. Data dictionary enabled.
Desktop	Database Explorer	Access local databases.
When a feature is available in only one or two versions of the Database Explorer, it is indicated in the help topic.

Through a persistent connection to a database, the Database Explorer enables you to:

Browse database server-specific schema objects, including tables, fields, stored procedure definitions, triggers, and indexes.

Create, view, and edit data in existing tables.

Create and maintain database aliases.

Enter SQL statements to query a database.

Create and maintain data dictionaries and attribute sets (Delphi Client/Server Suite and Delphi Developer only).

Launch the BDE Administrator to configure the Borland Database Engine (BDE).

 Other Database Explorer topics


The Database Explorer window

The Database Explorer window displays database information in two panes.

The left pane is tabbed and displays a hierarchical tree of objects:

Databases page, aliases of available databases.

Dictionary page, databases and attribute sets in the data dictionary.

The right pane contains tabbed pages that display the contents of objects highlighted in the left pane. The tabbed pages in the right pane vary depending on the type of object highlighted in the left pane. For a list, see Tabbed pages.

A plus sign (+) beside an object in the left pane indicates that the object contains other objects below it. To see those objects, click the plus sign. When an object is expanded to show its child objects, the plus sign becomes a minus sign. To hide child objects, click the minus sign. For a list of other graphic symbols in the left pane, see Color-coded symbols.

To view information about an object in the left pane, double-click the object. The right pane displays one or more tabbed pages of information about the object. For example, when a database alias is highlighted in the left pane, the right pane displays a Definition page that contains database Type, PATH, and DRIVER NAME parameters. Bolded parameter names indicate a parameter that cannot be modified. All other parameters that appear in the right pane can be edited there.

 Database Explorer user interface


Color-coded symbols

The following color-coded symbols appear to the left of objects in the left pane:

Icon	Meaning

Green box	The highlighted database is open. You can view objects in the database.

Red arrow	The object is in editing mode. There are changes in this object or in objects further down its tree that have not been applied.

Shining red arrow	The object is newly created.

Red X	This object is to be deleted. When changes to this object or its parent object are applied the object is deleted. To see this symbol, check Confirm Edits on the Options menu. Otherwise, the object will be deleted instantly without a chance to apply the deletion.

Applying edits

Note:	Edits only take effect when they are applied. To apply edits and make changes permanent:

1.	Click a red arrow or shining red arrow icon at the highest level where you want edits applied.

2.	Right-click and choose Apply or click the Apply button [image].

 Database Explorer user interface


Tabbed pages

The selections you make in the left pane enable some or all of the following right pane tabbed pages:

Right pane pages	Description

Definition	Displays the parameters of the database alias, table, or field highlighted in the left pane.

Summary	Displays the database objects contained within the parent object highlighted in the left pane.

Data	Displays the data in a selected table.

Enter SQL	Displays a window in which you can enter SQL statements.

Text	Displays the text of SQL database triggers and stored procedures.

You can edit parameters on the Definition page if the parameter names appear in normal type. If parameter names appear in bold, they cannot be edited.

You can enter and edit records in a table on the Data page if the table permits write access.

The tabbed pages available in the right pane differ depending on the currently selected object in the left pane. The following table summarizes the pages available for each type of object:

Object	Pages
SQL database	Definition Enter SQL (Delphi Client/Server only)
Local database	Definition Enter SQL (Delphi Client/Server and Delphi Developer only)
Tables (All tables in a database) Fields (All columns in a table) Indices (All indexes for a table) Validity Checks (All checks for a table) Referential Constraints (All constraints for a table) Security Specs (All specs for a table) Family Members (All files associated with a table)	Summary Enter SQL (Delphi Client/Server and Delphi Developer only)
Table (A single table in a database)	Definition Data Enter SQL (Delphi Client/Server and Delphi Developer only)
Field (A single column in a table) Index (A single index for a table) Validity Check (A single check for a table) Referential Constraint (A single constraint for a table) Security Spec (A single spec for a table) Family Member (A single member for a table)	Definition Enter SQL (Delphi Client/Server and Delphi Developer only)
Borland Database Engine (BDE) Alias	Definition Enter SQL (Delphi Client/Server and Delphi Developer only)
 Database Explorer user interface


Menu commands

The following topics define the commands available from each menu on the Database Explorer’s menu bar.

Object menu commands

Dictionary menu commands

Edit menu commands

View menu commands

Options menu commands

Help menu commands

Context menu commands (Data page)

Context menu commands (Enter SQL page)

Context menu commands (Blob Explorer)

 Database Explorer user interface


Object menu commands

These commands appear on the Object menu. Most of these commands are also available from the context menu that appears when you right-click with an object selected in the Database Explorer.

Object menu	Description

Open	Opens the highlighted object.

Close	Closes the highlighted object.

New	Creates a new instance of the highlighted object class.

Delete	Deletes the highlighted object.

Rename	Changes the name of an object.

Apply	Saves the highlighted object, including all changes and pending deletes to objects within its tree.

Cancel	Cancel the current operation.

Save As	Lets you specify a name for the SQL object to save.

Exit	Exits the Database Explorer.

Save Text To File	If an SQL object has a text representation on the Text page, you can save the object's text to a text file.

Version Information	Displays information on installed BDE DLL and driver files.

Vendor Configuration	Launches the ODBC Administrator or appropriate vendor-supplied SQL configuration utility for the selected database.

 Menu commands


Dictionary menu commands

Dictionary menu	Description

Select	Selects an existing data dictionary from the Select A Dictionary dialog box.

Register	Registers a new data dictionary in the Object Repository.

Unregister	Unregisters a data dictionary in the Object Repository. Unregistering does not delete a data dictionary, but prevents it from appearing in the Select a Dictionary dialog box.

New	Creates a new data dictionary.

Delete	Removes a data dictionary.

Import From Database	Import table schema information from an existing database into a data dictionary.

Import From File	Imports table schema information from a flat file.

Export To File	Exports a data dictionary to a flat file. This option is useful for sharing data dictionaries among different developers.

 Menu commands


Edit menu commands

Edit menu	Description

Undo	Cancels last command or revert to previous state

Cut	Copies and removes the selected parameter or field data, or text.

Copy	Copies but does not remove the selected parameter or field data, or text.

Paste	Pastes a cut or copied string into the selected field.

Delete	Deletes the selected text.

Select All	Selects all text on the Enter SQL page or Text page.

 Menu commands


View menu commands

View menu	Description

Toolbar	If checked, the toolbar is displayed near the top of the Database Explorer. The toolbar offers a few convenient icon duplicating the functionality of menubar commands such as Open, Delete, Cancel, Apply, Explore Blobs.

Status Bar	If checked, a status bar appears at the bottom of the Database Explorer window. It states how many items are found in the object highlighted in the left pane.

Blob Explorer	This command (and the Explore Blobs toolbar icon) opens the Blob Explorer. This window displays selected Blobs as a graphic image, or as data.

System Data	If checked, displays system data such as SQL server system tables, InterBase system indices and triggers, and so on. If this is irrelevant to your purpose, you can uncheck this item.

Tree Text	Shows the text for the entire tree of dependent objects and makes that text uneditable.

Change Text	If checked, lets you see the queries that will be executed when you apply your changes.

Large Icons	If checked, displays as large icons in the right pane, the contents of objects highlighted in the left pane.

Small Icons	If checked, displays as small icons in the right pane, the contents of objects highlighted in the left pane.

List	If checked, displays as a list in the right pane, the contents of objects highlighted in the left pane.

Detail	If checked, displays as a list in the right pane, the contents of objects highlighted in the left pane.

Auto Arrange	Auto Arrange works as in the Windows 95 Explorer: it arranges icons in the summary page automatically if the page is resized.

Refresh	If enabled for the currently selected object, Refresh redraws the display of the object and its children.

 Menu commands


Options menu commands

Options menu	Description

Query	Sets query format options, including Live Queries; if checked, the result set returned by queries is editable. Same as RequestLive property of TQuery.

Transaction Isolation	Specifies the transaction isolation level used by an SQL server: Dirty Read, Committed Read, or Repeatable Read.

Word Wrap	If checked, lines of text wrap on the Enter SQL and Text pages; otherwise, text stays on one line until you press Enter to start a new line.

Confirm Edits	If checked, a confirm dialog is displayed after performing any modifications.

Sync Pages	If checked, the schema information of the selected database is imported into the selected dictionary when you switch from the database page to the dictionary page. You are prompted to confirm this operation if Confirm Edits is checked.

 Menu commands


Help menu commands

Help menu	Description

Contents	Displays the WinHelp contents window.

About	Displays version and copyright information.

 Menu commands


Context menu commands (Data page)

When you right-click in the Data tabbed page (right pane), you can right-click it to display a context menu of commands that can be used to sort, filter, and show a range of data.

Context command	Description

Order	Specifies an index to sort on, or <none> for no sorting.

Range	Specifies a range of data to display.

Filter	Uses an expression to determine which data to display.

Begin Transaction	Lets you start an SQL transaction.

Commit Transaction	Completes the ongoing transaction.

Rollback Transaction	Cancels the ongoing transaction.

 Database Explorer user interface

 Menu commands


Context menu commands (Enter SQL page)

When you highlight an object on the Enter SQL tabbed page, you can right-click it to display a context menu of commands that can be used to edit the SQL statement in the window.

Context command	Description

Undo	Cancels last command or reverts to previous state

Cut	Copies and removes the selected text.

Copy	Copies the selected text.

Paste	Pastes the selected text.

Delete	Deletes the selected text.

Select All	Selects all text in the Enter SQL window.

Load From File	Loads SQL statements from a text file.

Save To File	Saves the SQL statements entered in this window to a text file.

Execute	Executes the current SQL statement

Previous Query	Executes the query that ran just before the current one.

Next Query	Execute the query that ran just after the current one.

Begin Transaction	Starts an SQL transaction.

Commit Transaction	Completes the ongoing transaction.

Rollback Transaction	Cancels the ongoing transaction.

Filter	Uses an expression to determine which data to display in a query's result set.

 Database Explorer user interface

 Menu commands


Context menu commands (Blob Explorer)

You can right-click in the Blob Explorer to choose these commands.

Context command	Description

Always On Top	If checked, the Blob Explorer stays on top of all other windows.

Show As Default	Shows the contents of a TGraphicsField as a graphic, shows the contents of a TMemoField as text, and is empty for other field types.

Show As Graphic	Forces the Blob Explorer to attempt to display contents of the current field as a graphic.

Show As Text	Forces the Blob Explorer to attempt to display contents of the current field as text.

 Database Explorer user interface

 Menu commands


Key commands

You can expand and contract the hierarchy of objects in the left pane by using the following keystrokes.

To do this...	Press this key...

Expand object (display child objects)	+ (plus sign) or Right key
Contract object (hide child objects)	- (minus sign) or Left key
Show entire tree (display all levels)	* (asterisk)
 Database Explorer user interface


Dictionary page

The Dictionary page shows databases and attribute sets available in the data dictionary. To display the Dictionary page, click the Dictionary tab in the left pane of the Database Explorer.

A data dictionary is a special database used to store attribute sets for field components in Delphi datasets. An attribute set describes a field component's properties, field type, and the type of visual control to create when the field component is dragged onto a form. By storing attribute sets in a data dictionary, you need only set properties once for a single component, and can then apply the attribute set to other field components that should share the same properties.

Attribute sets can be created for any database. You can derive attribute sets from an existing database by importing the database into the data dictionary, or you can create attribute sets directly from the Fields editor when working with a data set in a data module or form.

To view available databases and attribute sets, click to expand the tree in the left pane. You can use the Dictionary menu to create and edit data dictionary objects and can view and edit current settings on the tabbed pages in the right pane.

For more information on creating and editing data dictionary objects and interpreting information in the left and right panes of the Database Explorer, click a button below.

 Dictionary topics

 Database Explorer user interface


Creating a data dictionary

To create a new data dictionary:

1.	Click the Dictionary tab in the left pane.

2.	Select the Dictionary object in the left pane.

3.	Right-click the Dictionary object.

4.	Select New from the menu.

5.	Enter a name for the dictionary.

6.	Select the dictionary database alias.

7.	Enter a table name for the dictionary's data.

8.	Optionally, enter a description of the data dictionary.

Once you have added the required information, click OK.

 Dictionary topics


Importing attribute sets into a data dictionary

To import attribute sets into a data dictionary:

1.	Choose Import Database from the Dictionary menu. The Import Dictionary dialog box appears.

2.	Select or enter the dictionary from which to import attribute sets and choose OK.

 Dictionary topics


Updating attribute sets

To modify an attribute set:

1.	Expand the Dictionary object in the left pane until the Attribute Sets object appears.

2.	Click the plus sign beside the Attribute Sets object to display available attribute sets.

3.	Select the attribute set to modify in the left pane. The Definitions page appears in the right pane.

4.	Edit the desired attribute set properties.

5.	Right-click the attribute set to invoke the context menu, and choose Apply to apply your edits to the attribute set.

 Dictionary topics


Creating a new attribute set

To create a new attribute set:

1.	Expand the Dictionary object in the left pane until the Attribute Sets object appears.

2.	Right-click the Attribute Sets object to invoke the context menu, and choose New. The Definition page appears in the right pane.

3.	Enter a name for the attribute set in the left pane.

4.	Optionally specify a TField Class for the attribute set on the Definitions page in the right pane. The TField Class specifies the type of field component to create for a data field added to a dataset.

5.	Optionally specify a TControl Class for the attribute set on the Definitions page. The TControl Class specifies the type of data-aware control to insert in a form when fields that use this attribute set are dragged from the Fields editor to a form.

6.	Set the properties for the attribute set in the Definitions page.

7.	Right-click the attribute set object in the left pane to invoke the context menu, and choose Apply to add the attribute set to the Attribute Sets object.

 Dictionary topics


Attribute set

An attribute set in a data dictionary corresponds to the field type, properties, and the data-aware control that should be automatically created for a TField object when it is dragged to a form from the Fields editor at design time.

You can create attribute sets in the Database Explorer, or from the Fields editor.

To create an attribute set from the Fields editor:

1.	Set the properties for a field component using the Object Inspector.

2.	Right-click the field in the Fields editor to invoke the context menu.

3.	Choose Save to assign the attribute set the same name as the field or choose Save As to specify a different name for the attribute set.

When an attribute set is selected in the Database Explorer's left pane, the parameters for the attribute set appear on the Definitions page in the right pane. You can edit these parameters as needed. The following table lists the parameters for an attribute set and describes what they are used for:

Attribute	Definition

TField Class	The type of a field to create when a field is added to a dataset.
Blank yields a default TField depending on the physical data type.

TControl Class	The type of a control to create when you drag a field onto a form.
Blank yields a default TControl depending on the type of the TField.

Alignment	Used to center, left- or right-align data in an edit or grid control.

DisplayLabel	The column heading for a field displayed by a grid component. If DisplayLabel is empty, the FieldName property is used to supply the column heading.

DisplayWidth	The number of characters used to display a field in a grid control.

ReadOnly	True/False. Determines if the field is read only.

Required	True/False. Determines if a field value must be entered in a control.

Visible	True/False. Determines if a field is available for display in a grid control.

Transliterate	True/False. Determines if a field's type is translated as necessary between types in different databases.

EditMask	The mask used to limit data that can be put into a masked edit box or entered into a data field.

DisplayFormat	Used to format the value of a field for display purposes.

EditFormat	Used to edit the format of a field.

MaxValue	The maximum value allowed in a field.

MinValue	The minimum value allowed in a field.

Currency	True/False. Indicates if the field is a currency field.

Precision	Used in formatting numeric fields. The value of Precision is the number of decimal places to the right of the decimal point the numeric value should be formatted before rounding.

DisplayValues	Controls how a TBoolean field is translated to and from display format.

BlobType	Specifies the type of blob associated with a memo or graphic control.

Based On	Specifies another attribute set upon which this one is based. Changed made to properties in this attribute set override those in the attribute set upon which it is based.

Note:	Not all properties apply to all fields that use an attribute set. For example, if you specify a MaxValue property in the attribute set, but then apply the set to a TStringField object, MaxValue is ignored.

 Dictionary topics


Applying an attribute set to a TField object

To apply an attribute set to a TField object:

1.	Double-click a dataset to invoke the Fields editor.

2.	Select the field to which to apply the attribute set.

3.	Right-click the field to invoke the context menu.

4.	Choose Associate attributes.

5.	Select or enter the attribute set to apply from the Attribute set name dialog box. If there is an attribute set in the data dictionary that has the same name as the current field, that attribute set's name appears in the combo box.

 Dictionary topics


Databases and Dictionary pages

Use these pages to view and edit database aliases and data and to create and edit dataset attribute sets:

Databases page

Dictionary page


Databases page

The Databases page shows aliases of available databases. To view the Databases page, click the Databases tab in the left pane of the Database Explorer.

You can view and edit current settings on the tabbed pages in the right pane.

For more information on creating and editing database objects and interpreting information in the left and right panes of the Database Explorer, click a button below.

 Database topics

 Database Explorer user interface


Working with database aliases

You can use the Database Explorer to view, create, and modify Borland Database Engine (BDE) aliases. The following table lists each task and briefly describes the steps needed to accomplish it on the Databases page:

Task...	Instructions...

View aliases...	1.	Click the plus sign beside a database object in the left pane to see a list of alias objects.

2. 	Select the alias to view in the left pane. The Definitions page appears in the right pane.

Create an alias...	1.	Select a database object in the left pane.

2.	Right-click to invoke the context menu.

3.	Choose New.

4.	Select an alias type in the New Database Alias dialog box and choose OK.

5.	Type a name for the alias in the left pane.

6.	Enter a path for the alias in the PATH parameter on the Definitions page in the right pane. Optionally specify a driver in the Default Driver parameter.

7.	Right-click the database object in the left pane to invoke the context menu and choose Apply to update the database.

Modify an alias...	1.	Select the alias to modify in the left pane. The Definitions page appears in the right pane.

2.	Edit the PATH and Default Driver parameters as desired.

3.	Right-click the database object in the left pane to invoke the context menu and choose Apply to update the database.

Delete an alias...	1.	Select the alias to delete in the left pane.

2.	Right-click to invoke the context menu.

3.	Choose Delete to remove the alias.

4.	Right-click the database object to invoke the context menu and choose Apply to update the database.

 Database topics

 Database Explorer user interface


Aliases

An alias is a name and a set of parameters that describe a network resource. BDE applications use aliases to connect with shared databases. An alias is not required to address a local database, but it is required to address an SQL database.


Working with table data

You can use the Database Explorer to view, edit, insert, and delete data in tables. The following table lists each task and briefly describes the steps needed to accomplish it on the Databases page:

Task...	Instructions...

View table data...	1.	Select a table to view in the left pane.

2.	Click the Data page tab in the right pane to view a scrollable grid of all data in the table.

3.	Use the navigator buttons at the right side of the Database Explorer toolbar to scroll from record to record.

Edit a record...	1.	Edit the record's fields in the grid.

2.	To post the edits to the database, select a different record in the grid or click the navigator's Post button in the toolbar.

3.	To cancel an edit before moving to another record click the navigator's Cancel button in the toolbar or press ESC.

Insert a new record...	1.	Place the cursor on the row before which you wish to insert another row.

2.	Click the navigator's Insert button in the toolbar. A blank row appears.

3.	Enter data for each column. Move between columns with the mouse, or by tabbing to the next field.

4.	To post the insert to the database, select a different record in the grid or click the navigator's Post button in the toolbar.

5.	To cancel an insert before moving to another record click the navigator's Cancel button in the toolbar or press ESC.

Delete a record...	1.	Place the cursor on the row you wish to delete.

2.	Click the navigator's Delete button in the toolbar.

 Database topics

 Database Explorer user interface


Entering SQL statements

The SQL Explorer permits you to make SQL queries against an SQL database on a remote server. In Delphi Client/Server Suite and Delphi Developer the Database Explorer permits you to make queries against Paradox and dBASE tables.

To query a database using SQL:

1.	Select a database object in the left pane.

2.	Click the Enter SQL tab in the right pane to display an edit box where you can enter an SQL statement to execute.

3.	Enter an SQL statement in the edit box. If you enter statements that write to a table, such as INSERT, UPDATE, or DELETE, be sure to uncheck LIve Query by choosing Options|Query before executing the statement.

4.	Click the Run button to execute the query.

You can copy SQL statements from text files, a Help window, or other applications and paste them into the edit box. See Context menu commands (Enter SQL) for more information about copying, pasting, and loading SQL statements from a file.

Note:	If the SQL syntax you enter is incorrect, an error message is generated. You can freely edit the Enter SQL field to correct syntax errors.

 Database topics

 Database Explorer user interface


Blob Explorer dialog box

The Blob Explorer dialog box is used to display the contents of memo or graphics data in a blob (binary large object) field. While you can open the Blob Explorer at any time, it is only meaningful when you are browsing or editing blob data in a table. When you select a blob field, the blob data is displayed in this window.

If the field is a TGraphicsField, the Blob Explorer attempts to display the graphic. If the field is a TMemoField, the Blob Explorer attempts to display the blob text. For other blob field types, the Blob Explorer dialog box is empty. If you know the contents of another field type is text or graphics, you can right-click the dialog box to invoke a context menu from which you can choose Show As Text or Show As Graphic to force display of the field.

 Database topics

 Database Explorer user interface


Database Explorer toolbar

The Database Explorer toolbar contains the following buttons for executing commands:

Button	Command
Open	Open a new object.
Delete	Delete a selected object (does not apply to data edited on the Data page in the right pane of the Database Explorer).
Cancel	Abandon modifications to a selected object (does not apply to data edited on the Data page in the right pane of the Database Explorer).
Apply	Commit modifications of a selected object to the database (does not apply to data edited on the Data page in the right pane of the Database Explorer).
Explore Blobs	Displays a form for displaying text and graphics blobs associated with data in a table.
When the Enter SQL page appears in the right pane of the Database Explorer, the toolbar contains these buttons to the right of the Explore Blobs button for controlling transactions:

Button	Command
Begin Or Commit Transaction	Starts and posts database transactions.
Rollback Transaction	Cancels the most recent database transaction.
When the Data page appears in the right pane of the Database Explorer, the toolbar also contains the following buttons for displaying and editing records:

Button	Command
First Record	Go to first record.
Prior Record	Go to previous record.
Next Record	Go to next record.
Last Record	Go to last record.
Insert Record	Insert a new record.
Delete Record	Delete the current record.
Edit Record	Edit the current record.
Post Edit	Post a changed record to the database.
Cancel Edit	Abandon editing or inserting of a record.
Refresh Data	Fetch a new view of data from the database.
 Database Explorer user interface


Definition page

The Definition page in the right pane displays parameters of the object highlighted in the left pane.


Summary page

The Summary page in the right pane displays the database objects contained within the parent object highlighted in the left pane.


Text page

The Text page in the right pane displays the text of SQL database triggers and stored procedures.


Data page

The Data page in the right pane displays the data in the table selected in the left pane.


Enter SQL page

The Enter SQL page in the right pane displays a window for entering SQL statments.


Next Query command

Use Next Query to run the SQL query that ran just after the current one. You can also use the Next Query button in the lower right corner of the Enter SQL page.


Previous Query command

Use Previous Query to run the SQL query that ran just before the current one. You can also use the Previous Query button in the lower right corner of the Enter SQL page.


Always On Top command

When you right-click in the Blob Explorer dialog box and check Always On Top, the Blob Explorer dialog box always stays in front with all other windows behind it.


Auto Arrange command

Use Auto Arrange or View|Auto Arrange to arrange icons in the summary page automatically if the page is resized. Auto Arrange works as in the Windows 95 Explorer.


Begin Transaction command

When you right-click in the Enter SQL page or Data page, you can choose Begin Transaction to start the current SQL transaction. Once you begin a transaction, you can choose Commit Transaction to complete it or Rollback Transaction to cancel it.

You can also use the Begin Or Commit Transaction button that appears to the right of the Blob Explorer button when the Enter SQL page is visible.


Blob Explorer command

Use Blob Explorer or View|Blob Explorer to open the Blob Explorer. This window displays the selected blob field as a graphic image or as text.


Change Text command

Check View|Change Text to display queries that will be executed when you apply your changes. The queries are listed in a read-only Changes area on the Text page.


Commit Transaction command

Use Commit Transaction to complete the ongoing SQL transaction.

This command appears on the context menu when you right-click in the Enter SQL page or Data page (Database Explorer) after using Begin Transaction. To cancel the transaction instead of completing it, choose Rollback Transaction.

You can also use the Begin Or Commit Transaction button that appears to the right of the Blob Explorer button when the Enter SQL page is visible.


Delete A Dictionary dialog box

The Delete A Dictionary dialog box is used to specify the name of an existing data dictionary you want to delete. Enter or select the name of an existing data dictionary in the Dictionary Name combo box. To display the Delete A Dictionary dialog box, choose Dictionary|Delete.


Detail command

Use View|Detail to determine how information appears in the right pane. If checked, the contents of objects highlighted in the left pane appear as a list in the right pane. Related commands are View|List, View|Large Icons, and View|Small Icons.


Execute command

Use Execute to run the current SQL statement. This command appears when you right-click in the Enter SQL page.


Export To File command

Use Dictionary|Export To File to store a data dictionary as a flat file. This option is useful for sharing data dictionaries among different developers. This command displays the Export Dictionary To A File dialog box. Once you have exported a file, you can use Dictionary|Import From File to import and use it again.


Export Dictionary To A File dialog box

The Export Dictionary To A File dialog box is used to specify how and where to export a data dictionary in Borland Dictionary Export File (.BDX) format.

To display the Export Dictionary To A File dialog box, choose Dictionary|Export To File.

The following table lists the controls for this dialog box and explains how they are used.

Control	Purpose

Export File edit box	Specifies the name of the export file to create.

Browse button	Displays the Export File dialog box. This is basically the standard File Save dialog box (available as a component on the Dialogs page of the Component Palette). The Files of type combo box, however, is preset to search for files in Borland Dictionary Export format (.BDX). When you choose a file in this dialog, it is inserted into the Export File edit box in the Export Dictionary to a File dialog box.

Export type radio buttons	Specifies the type of dictionary data to export. Choices are:

1.	All Dictionary contents. This option exports all attribute sets for all available databases.

2.	Selected databases. This option enables you to specify the databases from which to export attribute sets.

3.	Selected attribute sets. This option enables you to specify which attribute sets belonging to a single database are to be exported.

Export List list box	Enables you to multi-select databases or attribute sets to export.


Filter command

When you right-click and choose Filter on the Data page in the right pane, you can enter an expression that specifies which data to display. The Set Filter dialog box appears.

When you right-click in the Enter SQL page and choose Filter, you can specify which query results to display.


Set Filter dialog box

You can use this dialog box to enter an expression that determines what displays on the Data page or in an SQL query result set. To display the Set Filter dialog box, right-click and choose Filter on the Data page or the Enter SQL page.

Dialog box options

Filter Expression

The expression that specifies which data to display.


Import From Database command

 Use Dictionary|Import From Database to import table schema information from an existing database into a data dictionary. This command displays the Import Database dialog box.


Import Database dialog box

The Import Database dialog box is used to specify the name of an existing database whose column attributes you want to import into the current data dictionary as attribute sets. Enter or select the name of an existing data dictionary in the Database Name combo box.

To display the Import Database dialog box, choose Dictionary|Import From Database.


Import From File command

Use Dictionary|Import From File to retrieve table schema information from a flat file. This command displays the Import From File Into Dictionary dialog box. To create a file to import, use Dictionary|Export To File.


Import From File Into Dictionary dialog box

The Import From File Into Dictionary dialog box is basically the standard File|Open dialog box (available as a component on the Dialogs page of the Component Palette). The Files Of Type combo box, however, is preset to look for flat files with the Borland Dictionary Export Files extension (.BDX). This file type contains a previously exported data dictionary.

To display this dialog box, choose Dictionary|Import From File.


Large Icons command

Use View|Large Icons to determine how information appears in the right pane. If checked, contents of objects highlighted in the left pane appear as large icons in the right pane. Related commands are View|List, View|Detail, and View|Small Icons.


List command

Use View|List to determine how information appears in the right pane. If checked, the contents of objects highlighted in the left pane appear as a list in the right pane. Related commands are View|Detail, View|Large Icons, and View|Small Icons.


Load From File command

Right-click in the Enter SQL page and choose Load From File to read in SQL statements from a text file. This command displays the Load Query dialog box. To save Text page contents as files in the Database Explorer, use Save Text To File.


Load Query dialog box

The Load Query dialog box is basically the standard File|Open dialog box. The Files Of Type combo box, however, is preset to look for text files with an extension of .SQL. It is assumed each such file contains a valid SQL query that can be read into the query edit box on the Enter SQL page in the right pane of the Database Explorer or BDE Administrator.

To display this dialog box, right-click in the Enter SQL page and choose Load From File.


Create A New Dictionary dialog box

The Create A New Dictionary dialog box is used to specify information about the new data dictionary you want to create. Follow these steps to create the new data dictionary:

1.	Enter a name for the dictionary in the Dictionary Name edit box.

2.	Select the dictionary database alias from the Database list box.

3.	Enter or select a table name for the dictionary's data in the Table Name edit box.

4.	Optionally enter a description of the data dictionary in the Description memo box.

5.	Once you have added the required information, click OK.


Order command

Right-click in the Data page and choose Order to specify an index to sort by, or choose <none> to temporarily disable an existing index so new records aren't sorted. This command is temporary and doesn't alter any indices applied to the table.

When you choose Order, the Set Order dialog box appears.


Set Order dialog box

Use the Set Order dialog box to determine the display order of data on the Data page. To display this dialog box, right-click in the Data page and choose Order.

Dialog box options

Index Fields

The field or fields included in the selected index.

Available Indices

Indices you can choose from to specify a sort order for the data.

Indices

Displays the Set Indices dialog box so you can add indices for sorting non-SQL tables and delete indices from the list.


Set Indices dialog box

Use the Set Indices dialog box to add and remove indices for sorting data on the Data page. To display this dialog box, right-click in the Data page and choose Order, then click the Indices button in the Set Order dialog box.

Dialog box options

Indices

Lists each index available for determining the displayed sort order of the selected data.

Add

Adds an index to the list.

Delete

Removes an index from the list.

Clear

Clears all indices from the list.


Query command

Use Options|Query to set options for queries executed on the Enter SQL page. You can configure the Database Explorer for limited compatibility with tools from server vendors, such as Sybase isql.exe and Microsoft SQL Server saf.exe.

When you choose Options|Query, the Query Options dialog box appears.


Query Options dialog box

Use the Query Options dialog box to set options for queries executed on the Enter SQL page. To display this dialog box, use Options|Query.

Dialog box options

Line Delimiter

The string that separates one line from another. By default, Line Delimiter is "---" and no statement delimiter is defined. For Sybase, for example, you would set it to "go".

Stmt Delimiter

The string that separates one statement from another. By default, Stmt Delimiter is "#0", undefined. A typical statement delimiter is ";".

Escape Char

The string that indicates an Escape code. By default, Escape Char is "#0" (undefined).

Escaped Quotes

Check this box to use quotes as string delimiters; uncheck it to treat them as literals.

Comment Styles

The string that delimits a comment.

Query Results

If checked, Request Live Queries indicates that the result set returned by queries is editable. This is the same as the RequestLive property of TQuery.


Range command

Right-click in the Data page and choose Range to specify a range of data to display.

When you choose Range, the Set Range dialog box appears.


Set Range dialog box

Use this dialog box to select a range of data to display on the Data page. To display this dialog box, right-click in the Data page and choose Range.

Dialog box options

From

The smallest value to display in the specified field.

To

The greatest value to display in the specified field.

Exclude

Check for From, To, or both to prevent the specified value(s) from displaying.


Register command

Use Dictionary|Register to register a new data dictionary in the Object Repository. This command displays the Register An Existing Dictionary dialog box.


Register An Existing Dictionary dialog box

The Register An Existing Dictionary dialog box is used to specify information about an existing data dictionary you want to store in the Object Repository.

To display this dialog box, choose Dictionary|Register.

Follow these steps to register a data dictionary:

1.	Enter a name for the dictionary in the Dictionary Name edit box.

2.	Select the dictionary database alias from the Database list box.

3.	Enter or select a table name for the dictionary's data in the Table Name edit box.

4.	Optionally enter a description of the data dictionary in the Description memo box.

5.	Once you have added the required information, click OK.


Rollback Transaction command

Use Rollback Transaction to cancel the ongoing SQL transaction.

This command appears on the context menu when you right-click in the Enter SQL page or Data page after using Begin Transaction. To complete the transaction instead of canceling it, choose Commit Transaction.

You can also use the Rollback Transaction button, the second button to the right of the Blob Explorer button when the Enter SQL page is visible.


Save As command

Use Save As or Object|Save As to save the selected SQL object under the same or a different name. If you specify a new name, a new object is created and any editing changes are applied to the new object. Edits to the original object remain intact, but are not applied to the original object until you choose to apply them.

When you choose Save As, the Save As dialog box appears.


Save As dialog box

You can use the Save As dialog box to save the selected object under the same or a different name. To display this dialog box, use Save As or Object|Save As.

Dialog box options

New Name

Enter the new name for the object in the edit box. By default, the current name is proposed. Choose OK without changing the name to use it.


Save Text To File command

When the selected SQL object has a text representation on the Text page, you can right-click and use Save Text To File to save the object's text to a text file.

You can also save a change script to a text file, which can be useful when you want to reuse the script on different systems with the same SQL object. To save a change script, click or tab into the change script and choose Save Text To File. Unless the change script is selected, choosing Save Text To File saves the object, not the script.

When you choose Save Text To File, the Save Query dialog box appears. Locate the desired target directory and enter a new name for the file or choose an existing file to overwrite.


Save To File command

You can right-click in the Enter SQL page and use Save To File to save the SQL statements entered in this window to a text file.

When you choose Save To File, the Save Query dialog box appears. Locate the desired target directory and enter a new name for the file or choose an existing file to overwrite.


Save Query dialog box

Dialog Box options

The Save Query dialog box is basically the standard File|Save dialog box. The Files Of Type combo box, however, is preset to save the current SQL statements or text as a text file with an extension of .SQL.

To display this dialog box, choose Save To File on the Enter SQL page or Save To Text File on the Text page (in Database Explorer).


Select All command

Use Select All or Edit|Select All to select all text on the Enter SQL or Text page.


Select command

Use Dictionary|Select to select an existing data dictionary from the Select A Dictionary dialog box.


Select A Dictionary dialog box

The Select A Dictionary dialog box is used to specify the name of an existing data dictionary you want to make the active dictionary. Enter or select the name of an existing data dictionary in the Dictionary Name combo box.

To display this dialog box, choose Dictionary|Select.


Show As Default command

Right-click in the Blob Explorer and choose Show As Default to show the contents of a TGraphicsField as a graphic, show the contents of a TMemoField as text, and show nothing for other field types.

You can use Show As Graphic or Show As Text to force the Blob Explorer to display the contents of the current field in the specified way.


Show As Graphic command

By default, the Blob Explorer shows the contents of a TGraphicsField as a graphic, shows the contents of a TMemoField as text, and shows nothing for other field types.

You can right-click in the Blob Explorer and choose Show As Graphic to force the Blob Explorer to attempt to display the contents of the current field as a graphic.


Show As Text command

By default, the Blob Explorer shows the contents of a TGraphicsField as a graphic, shows the contents of a TMemoField as text, and shows nothing for other field types.

You can right-click in the Blob Explorer and choose Show As Text to force the Blob Explorer to attempt to display the contents of the current field as text.


Small Icons command

Use View|Small Icons to determine how information appears in the right pane. If checked, the contents of objects highlighted in the left pane appear as small icons in the right pane. Related commands are View|Detail, View|Large Icons, and View|List.


Sync Pages command

Check Options|Sync Pages to import the schema information of the selected database into the selected dictionary when you switch from the database page to the dictionary page. You are prompted to confirm this operation if Confirm Edits is checked.


System Data command

If View|System Data is checked, system data such as SQL server system tables, InterBase system indices and triggers, and so on is displayed. If this is irrelevant to your purpose, you can uncheck this item.


Text command

When the Database Explorer is started from within the IDE, you can choose Edit|Text to edit the selected SQL object in the code editor. While you edit an SQL object in the code editor, the object's text is read-only in the BDE Administrator.


Toolbar command (Database Explorer)

If View|Toolbar is checked, the Database Explorer toolbar appears near the top of the Database Explorer. The toolbar offers a few convenient icons duplicating the functionality of menubar commands such as Open, Delete, Cancel, Apply, Explore Blobs.


Tree Text command

If View|Tree Text is checked, the text for the entire tree of dependent objects appears, and is uneditable.

For example, when you view the text of a table definition, you see table options such as space allocation, and column information. You can edit this text.

When Tree Text is checked, you also see corresponding index, primary key, foreign key, constraints, and trigger text, plus any other text that the server supports that would be deleted along with the table. You are unable to edit this text.


Unregister command

Use Dictionary|Unregister to unregister a data dictionary in the Object Repository. Unregistering does not delete a data dictionary, but prevents it from appearing in the Select A Dictionary dialog box.

This command displays the Unregister A Dictionary dialog box.


 Unregister A Dictionary dialog box

The Unregister A Dictionary dialog box is used to specify the name of an existing data dictionary you want to remove from the Object Repository. Enter or select the name of an existing data dictionary in the Dictionary Name combo box.

To display this dialog box, choose Dictionary|Unregister.


Word Wrap command

If Options|Word Wrap is checked, long lines of text and SQL statements wrap to display completely on the Text and Enter SQL pages. Otherwise, long lines extend to the right so you must scroll to view them.


Transaction Isolation command

Choose Edit|Transaction Isolation to specify an isolation level for SQL transactions.

Choose Dirty Read to return any change, regardless of whether the record has been committed.

Choose Committed Read to return only committed versions of the record; uncommitted changes will not be reflected in the result.

Choose Repeatable Read to return only the original record for the duration of the transaction, even if another application has committed a change.

For more information on these levels, see the documentation for your SQL server.


Reserved

Reserved for future use.


About command

Use About or Help|About to display version and copyright information for Database Explorer or the BDE Administrator (this item does not appear when you invoke the Database Explorer from the Delphi IDE).


Apply command

Use Apply or Object|Apply to save the highlighted object, including all changes and pending deletes to objects within its tree.


Cancel command

Use Cancel or Object|Cancel to cancel the current operation.


Close command

Use Close or Object|Close to close the highlighted object.


Confirm Edits command

Use Options|Confirm Edits to help prevent unwanted changes. If checked, a confirmation dialog is displayed after performing any modifications.


Contents command

Use Help|Contents to display the table of contents window for online Help.


Copy command

Use Copy or Edit|Copy to put the selected parameter, field data, or text on the Windows Clipboard without removing it.


Cut command

Use Cut or Edit|Cut to put the selected parameter, field data, or text on the Windows Clipboard and remove it.


Delete command

Use Delete or Object|Delete to remove the highlighted object or text without putting it on the Windows Clipboard.

Use Delete or Edit|Delete to remove selected text on the Enter SQL or Text (Database Explorer) pages.

In Database Explorer, use Dictionary|Delete to remove a data dictionary. This command displays the Delete A Dictionary dialog box.


Exit command

Use Exit or Object|Exit to close the Database Explorer or BDE Administrator window.


New command

Use New or Object|New to create a new instance of the highlighted object class. If the selected object is a database name, the New Database Alias dialog box appears.

In the Database Explorer, use Dictionary|New to create a new data dictionary. This command displays the Create A New Dictionary dialog box.


New Database Alias dialog box

The New Database Alias dialog box is used to select a driver which represents the kind of alias to create.

To display this dialog box, choose Object|New on the Databases page.

Dialog box options

Database Driver Name

The driver type of the new alias to created. The default name assigned is the driver name. To enter another name, select the alias, right-click and choose Rename.


Open command

Use Open or Object|Open to open the highlighted object.

Open dialog box options

Look In

Displays the current directory. The list below shows the files and folders in that directory.

File Name

Lists the files (*.CFG or *.*) in the current directory.

Files Of Type

Shows the type of files listed in the File Name text box.


Paste command

Use Paste or Edit|Paste to paste a cut or copied string into the selected field.

When you right-click in the Enter SQL page in Database Explorer and choose Paste, it copies text from the Windows Clipboard into the current SQL statement.


Refresh command

Use Refresh or View|Refresh to redraw the currently selected object and its children.


Rename command

Use Rename or Object|Rename to change the name of the selected object. Type the new name over the old.


Status Bar command

Check View|Status Bar to display a status bar appears at the bottom of the Database Explorer or BDE Administrator window. It states how many items are found in the object highlighted in the left pane.


Undo command

You can right-click and choose Undo or Edit|Undo to cancel the last command in the Enter SQL page or revert to the previous state in the active parameter field.


Vendor Configuration command

Note:	This command name is dynamic and is actually the name of the vendor-supplied configuration utility that BDE Administrator expects to use with the selected driver or alias.

Use Vendor Configuration or Object|Vendor Configuration to add, delete, and configure ODBC or SQL drivers or aliases of the highlighted type. If available, the vendor-supplied configuration utility for that driver type or alias appears. If one is not found, an Open dialog box appears, and you can choose an alternate vendor configuration utility. If you specify an alternate utility, it is saved in the registry under Cfgutils and displayed the next time you highlight a driver or alias of that type and choose Vendor Configuration.

For more information, access Help available through utility dialog boxes.


ODBC Administrator command

Use ODBC Administrator to add, delete, and configure ODBC drivers or data sources. This command appears when you right-click the Databases node on the Databases page or the ODBC node on the Configuration page. It displays the ODBC administration utility provided by your ODBC driver vendor.

When you highlight an ODBC driver or data source and right-click, you can choose Vendor Configuration to display the same ODBC administration utility.

For more information, display Help within each administrator dialog box.


Version Information command

Use Version Information or Object|Version Information to display information on installed BDE DLL and driver files as well as configuration DLLs provided by other vendors. This can be useful when solving technical problems.

The BDE Version Information dialog box appears.


Version Information dialog box

This dialog box displays information on installed BDE DLL files and vendor configuration DLLs, if present. Version information can be useful when solving technical problems.

To display this dialog box, choose Version Information or Object|Version Information.

Dialog box options

DLL Name

The name of a DLL file installed as part of the BDE installation or non-standard server installation (such as an SQL server).

Version Number

The version number assigned to that DLL.


Reserved

This topic reserved for future use.


ODBC is not installed
ODBC is not installed.

The BDE Administrator could not find the ODBC dynamic link library (ODBC32.DLL).

This .DLL is commonly installed in the recommended locations:

Windows\System

or

odbcsdk\bin

Click OK in the Configuration page of the BDE Administrator error message dialog box, then check to see if ODBC32.DLL is anywhere on the workstation hard disk. If you find the .DLL in a different directory other than those mentioned above, try moving it to the recommended location. Then re-start the BDE Administrator and try your operation again.

If you continue to have problems, you might need to reinstall ODBC.


Help topic not available
Help topic not available.

The requested Help topic is in a Help file that has not been installed or that has been installed and deleted.

For example, information on SQL drivers is in the Borland SQL Links Help. If you haven't installed Borland SQL Links, you can only view topics on Paradox, dBASE, and ODBC drivers contained in the BDE Administrator Help file.


Apply current configuration changes?

You have made driver configuration changes and have not yet saved them. Choose Yes to save them or no to cancel all changes.


Apply current changes to databases?
Apply current configuration changes to databases?

You have made configuration changes to BDE databases. Choose Yes to save the changes or No to cancel the changes.


Save changes to databases?

You have made data changes to BDE databases. Choose Yes to save the changes or No to cancel the changes.


To continue operation...
To continue operation, databases must be closed. Close databases?

Choose OK to continue and close the databases or Cancel to stop the present operation. You will have a chance to save any databases with unsaved changes.